//****************************************************
// Porman Project 2
// Filename: CBaseObject.h
// Date: 2009/06/27
// Author: KengYu Lin
// Modify:
//****************************************************
#ifndef _CBASEOBJECT_H
#define _CBASEOBJECT_H

#include "CGLDef.h"

namespace Porman
{

namespace GL
{

class CBaseObject
{
    friend class CRenderDevice;
public:
    PGL_API virtual void setName( const char* pName ) = 0;
    PGL_API std::string getName( void ) { return m_sName; }

protected:
    CBaseObject( CRenderDevice* pDevice );
    virtual ~CBaseObject( void ) {}

    //------------------------
    // Counter of Obj:
    //------------------------
    static int m_iNumOfShaderObj;
    static int m_iNumOfFXObj;
    static int m_iNumOfBufferObj;
    static int m_iNumOfDepthStencilObj;
    static int m_iNumOfTextureObj;
    static int m_iNumOfFrameBufferObj;
    static int m_iNumOfVertexDeclObj;
    static int m_iNumOfQueriesObj;

protected:
    std::string  m_sName;
    CRenderDevice* m_pDeviceRef;
};

}//End namespace GL

}//End namespace Porman

#endif